/*
 * @Descripttion:
 * @Author: liuyu
 * @Date: 2023-12-04 15:44:23
 * @LastEditors: liuyu
 * @LastEditTime: 2023-12-04 15:44:23
 * @FilePath: /app/controller/menu.js
 */
'use strict';
const axios = require('axios');
const Controller = require('egg').Controller;
class BaseController extends Controller {
  async upload() {
    const { ctx } = this;
    const files = ctx.request.files
    // const res = await axios('http://1api/upload');
    // helper.render(200, res);
    const formData = new FormData();
    formData.append('file', files);
    const res = await axios.post('http://123.57.245.63/?s=upload/index', formData);
    console.log(res);
    // console.log(ctx.request.body);
    // console.log(ctx.request.files);
  }
}

module.exports = BaseController;
